package org.bolmart.dao;

import java.util.List;

import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.flex.remoting.RemotingDestination;
import org.springframework.flex.remoting.RemotingInclude;
import org.springframework.orm.hibernate3.HibernateTemplate;
import org.springframework.stereotype.Service;

@Service("fooService")
@RemotingDestination(channels = {"my-amf"})
public class Foo {
//	protected HibernateTemplate template;
@RemotingInclude
public String sayHello(String name) {
	return "hello, "+name;
}
//@Autowired
//	public void setSessionFactory(SessionFactory sessionFactory){
//		template = new HibernateTemplate(sessionFactory);
//	}
//@RemotingInclude
//	public void addCustomer(String firstName, String lastName){
//		Customer customer = new Customer();
//		customer.setFirstName(firstName);
//		customer.setLastName(lastName);
//		template.save(customer);
//	}
//@RemotingInclude	
//	public List<Customer> getCustomer(){
//		return template.findByExample(new Customer());
//	}
}
